/**
 * 
 */
package com.alstudio.ui.module.recharge;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.loovee.imaohu.R;

/**
 * @author alonso lee
 * 
 */
public class AlipayRechrageItem extends RelativeLayout {

	private TextView gold, price;
	private View buyLayout;
	private LayoutInflater inflater;
	private Context context;

	/**
	 * @param context
	 */
	public AlipayRechrageItem(Context context) {
		super(context);
		// TODO Auto-generated constructor stub
		// alipay_item_layout
		this.context = context;
		initView();
	}

	private void initView() {
		inflater = (LayoutInflater) context
				.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		inflater.inflate(R.layout.alipay_item_layout, this);
		gold = (TextView) findViewById(R.id.gold);
		price = (TextView) findViewById(R.id.price);
		buyLayout = findViewById(R.id.buyLayout);
	}

	public void setGold(String text) {
		gold.setText(text);
	}

	public void setPrice(String price) {
		this.price.setText(price);
	}

	public void setBuyTag(int tag) {
		buyLayout.setTag(tag);
	}

	public void setBuyClickListener(OnClickListener listener){
		buyLayout.setOnClickListener(listener);
	}
	
}
